package com.ez.supervise.dao.impl;

import java.util.List;

import com.ez.supervise.dao.RoleDao;
import com.ez.supervise.dao.base.BaseDaoImpl;
import com.ez.supervise.model.sys.Role;

public class RoleDaoImpl extends BaseDaoImpl implements RoleDao {

    public void insert(Object role) {
	sqlMapClientTemplate.insert("sys.insertRole", role);
    }

    public Object get(Long id) {
	return (Role) sqlMapClientTemplate.queryForObject("sys.getRoleById", id);
    }

    public void update(Object role) {
	sqlMapClientTemplate.update("sys.updateRole", role);
    }

    public List<Role> findAllRole() {
	return (List<Role>) sqlMapClientTemplate.queryForList("sys.findAllRole");
    }

    public void delete(Long id) {
	sqlMapClientTemplate.update("sys.deleteRole", id);
    }

}
